﻿using Prism.Ioc;
using WheelClean2.Views;
using System.Windows;
using WheelClean2.ViewModels;
using System;
using System.Diagnostics;
using WheelClean.ViewModels;

namespace WheelClean2
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App
    {
        protected override Window CreateShell()
        {
            return Container.Resolve<MainWindow>();
        }

        protected override void RegisterTypes(IContainerRegistry containerRegistry)
        {
            containerRegistry.RegisterForNavigation<Monitor, MonitorViewModel>();
          
            containerRegistry.RegisterForNavigation<LaserList, LaserListViewModel>();
            containerRegistry.RegisterForNavigation<TraceList, TraceListViewModel>();
            containerRegistry.RegisterForNavigation<IOList, IOListViewModel>();
            containerRegistry.RegisterForNavigation<ProductBOMList, ProductBOMListViewModel>();
            containerRegistry.RegisterForNavigation<CurrentAlarmList, CurrentAlarmListViewModel>();


            containerRegistry.RegisterDialog<LaserControl, LaserControlViewModel>();
            containerRegistry.RegisterDialog<LaserParameters, LaserParametersViewModel>();
            containerRegistry.RegisterDialog<ProductBOMInfo, ProductBOMInfoViewModel>();
            containerRegistry.RegisterDialog<AlarmDialog, AlarmDialogViewModel>();
            


            containerRegistry.RegisterDialog<TraceInfo, TraceInfoViewModel>();

            






        }
        protected override void OnInitialized()
        {
            AppDomain.CurrentDomain.UnhandledException += (s, e) =>
                Debug.WriteLine(e.ExceptionObject.ToString());

            base.OnInitialized();
        }
    }
}
